<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/10
 * Time: 17:13
 */

namespace common\business\task;


use yii\base\Model;

class TaskResponseData extends Model
{
    const CODE_SUCCESS = 0;
    const CODE_ERROR = 1;
    const CODE_UN_FINISHED = 2;

    /**
     * @var integer
     */
    public $code;

    /**
     * @var string
     */
    public $message;

    /**
     * @var string
     */
    public $data;

    /**
     * TaskResponseData constructor.
     * @param int $code
     * @param string $message
     * @param string $data
     */
    public function __construct($code = TaskResponseData::CODE_SUCCESS, $message = '', $data = '')
    {
        parent::__construct([
            'code' => $code,
            'message' => $message,
            'data' => $data,
        ]);
    }
}